package com.mine.modules.sys.mapper;

import com.mine.modules.sys.entity.SysRolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 角色权限表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-10-09
 */
public interface SysRolePermissionMapper extends BaseMapper<SysRolePermission> {


    /**
     * 通过用户ID查询场景权限
     * @param userId
     * @return
     */
    @Select("select a.* from sys_role_permission a,sys_user_role b where a.role_id =b.role_id and b.user_id = #{userId} ")
    public List<SysRolePermission> queryRolePermission(@Param("userId") String userId);

}
